/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.model;
import com.legendshop.dao.persistence.*;
import com.legendshop.dao.support.GenericEntity;

import java.util.Date;
import java.util.List;

/**
 *
 */
@Entity
@Table(name = "ls_project")
public class Project implements GenericEntity<Long> {

	private static final long serialVersionUID = -7666450319283323342L;

	/** 主键 */
	private Long id; 
		
	/** 项目名称 */
	private String name; 
		
	/** 项目别名 */
	private String aliasName; 
		
	/** 0:普通项目,1:公共项目 */
	private Long type; 
		
	/** 开始时间 */
	private Date startTime; 
		
	/** 结束时间 */
	private Date endTime; 
		
	/** 可用工作日 */
	private Date workday; 
		
	/** 预估工时 */
	private Double estimateHours;

	/** 每周最大填写的时长 **/
	private Double maxHoursPerweek = 0.0d;
		
	/** 实际消耗工时,可以通过工时填报统计出来 */
	private Double actualHours; 
	
	/** 负责人(user_name) */
	private String principal; 
		
	/** 负责人真实名称 */
	private String principalRealName; 
	
	/** 测试负责员(user_name) */
	private String tester; 
		
	/** 测试负责员名称 */
	private String testerRealName; 
		
	/** 描述 */
	private String remark; 
		
	/** 完成时间 */
	private Date finishTime; 
		
	/** 创建时间 */
	private Date createTime; 
		
	/** 创建人(user_id) */
	private String creater; 
		
	/** 项目状态, 0:未开始, 1:正在进行,2:已结束, 3: 挂起, 4, 延期 */
	private Integer status; 
	
	private List<ProjectModule> modules; //项目模块

	private List<ProjectPlan> plans; //活动中项目里程碑

	private int deleted = 0; //是否删除
		
	
	public Project() {
    }
		
	@Id
	@Column(name = "id")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "generator")
	@TableGenerator(name = "generator", pkColumnValue = "PROJECT_SEQ")
	public Long  getId(){
		return id;
	} 
		
	public void setId(Long id){
			this.id = id;
		}
		
    @Column(name = "name")
	public String  getName(){
		return name;
	} 
		
	public void setName(String name){
			this.name = name;
		}
		
    @Column(name = "alias_name")
	public String  getAliasName(){
		return aliasName;
	} 
		
	public void setAliasName(String aliasName){
			this.aliasName = aliasName;
		}
		
    @Column(name = "type")
	public Long  getType(){
		return type;
	} 
		
	public void setType(Long type){
			this.type = type;
		}
		
    @Column(name = "start_time")
	public Date  getStartTime(){
		return startTime;
	} 
		
	public void setStartTime(Date startTime){
			this.startTime = startTime;
		}
		
    @Column(name = "end_time")
	public Date  getEndTime(){
		return endTime;
	} 
		
	public void setEndTime(Date endTime){
			this.endTime = endTime;
		}
		
    @Column(name = "workday")
	public Date  getWorkday(){
		return workday;
	} 
		
	public void setWorkday(Date workday){
			this.workday = workday;
		}
		
    @Column(name = "estimate_hours")
	public Double  getEstimateHours(){
		return estimateHours;
	} 
		
	public void setEstimateHours(Double estimateHours){
			this.estimateHours = estimateHours;
		}
		
    @Column(name = "actual_hours")
	public Double  getActualHours(){
		return actualHours;
	} 
		
	public void setActualHours(Double actualHours){
			this.actualHours = actualHours;
		}
		
		
		
    @Column(name = "remark")
	public String  getRemark(){
		return remark;
	} 
		
	public void setRemark(String remark){
			this.remark = remark;
		}
		
    @Column(name = "finish_time")
	public Date  getFinishTime(){
		return finishTime;
	} 
		
	public void setFinishTime(Date finishTime){
			this.finishTime = finishTime;
		}
		
    @Column(name = "create_time")
	public Date  getCreateTime(){
		return createTime;
	} 
		
	public void setCreateTime(Date createTime){
			this.createTime = createTime;
		}
		
    @Column(name = "creater")
	public String  getCreater(){
		return creater;
	} 
		
	public void setCreater(String creater){
			this.creater = creater;
		}
		
    @Column(name = "status")
	public Integer  getStatus(){
		return status;
	} 
		
	public void setStatus(Integer status){
			this.status = status;
		}

	@Transient
	public List<ProjectModule> getModules() {
		return modules;
	}

	@Transient
	public List<ProjectPlan> getPlans() {
		return plans;
	}

	public void setPlans(List<ProjectPlan> plans) {
		this.plans = plans;
	}

	public void setModules(List<ProjectModule> modules) {
		this.modules = modules;
	}

    @Column(name = "principal")
	public String getPrincipal() {
		return principal;
	}

	public void setPrincipal(String principal) {
		this.principal = principal;
	}

	@Transient
	public String getPrincipalRealName() {
		return principalRealName;
	}

	public void setPrincipalRealName(String principalRealName) {
		this.principalRealName = principalRealName;
	}

    @Column(name = "tester")
	public String getTester() {
		return tester;
	}

	public void setTester(String tester) {
		this.tester = tester;
	}

	@Transient
	public String getTesterRealName() {
		return testerRealName;
	}

	public void setTesterRealName(String testerRealName) {
		this.testerRealName = testerRealName;
	}

    @Column(name = "deleted")
	public int getDeleted() {
		return deleted;
	}

	public void setDeleted(int deleted) {
		this.deleted = deleted;
	}

	@Column(name = "max_hours_perweek")
	public Double getMaxHoursPerweek() {
		return maxHoursPerweek;
	}

	public void setMaxHoursPerweek(Double maxHoursPerweek) {
		this.maxHoursPerweek = maxHoursPerweek;
	}


}
